core: Use mmap() with O_NOATIME if merely reading archive-z2 entries
authorColin Walters <walters@verbum.org>
Sun, 2 Dec 2012 20:20:17 +0000 (15:20 -0500)
committerColin Walters <walters@verbum.org>
Sun, 2 Dec 2012 20:20:17 +0000 (15:20 -0500)
commitfc7f05940c6c7ff2e778c562ab51303879b82e4b
tree83ab08541fbb420ac032da490bd05dcc9a3f6fa5
parent7fcebed4e88151ce97a0cc4e61ca0f6b0bb4bcdf
core: Use mmap() with O_NOATIME if merely reading archive-z2 entries

Previously we'd open(path, O_NOATIME) and do a series of small read()
calls to just parse the header.  I think this will trigger kernel readahead
into the compressed portion, but we don't care about that.

This should be more efficient.
src/libgsystem
src/libostree/ostree-core.c